home *** CD-ROM | disk | FTP | other *** search
/ Colorado Rockies 2000 / Colorado Rockies 2000 by US West.iso / mac / xtras / Beatnik Xtra Lite / Beatnik Behaviors LiteD7.cst / 00007_Script_MuteTrack Lite Behavior < prev    next >
Text File  |  1998-10-22  |  5KB  |  134 lines

  1. -- MuteTrack Lite, a Beatnik Behavior
  2. -- by Paul Sebastien, pauls@sirius.com, http://www.bitstream.net/psykosonik
  3.  
  4. -- The 'Pro' version of this behavior will feature automatic Beatnik instance selection for targetting specific instances, and more. For more info, go to http://www.headspace.com/
  5.  
  6.  
  7.  
  8. global beatnik
  9.  
  10.  
  11.  
  12.  
  13.  
  14. property pWhichEvent
  15. property pWhichTrack
  16. property pMuteState
  17.  
  18.  
  19. on getPropertyDescriptionList
  20.   
  21.   --  initialize the Beatnik Xtra instance
  22.   
  23.   --  instantiation script (below) is commented out, as it is not necessary to instantiate a new instance, since we are just muting a track on an existing one named 'beatnik'. Please make sure that the instance that you want to perform the muting of tracks on is named 'beatnik', otherwise you should change the instance name in this script to match the instance name that you want to mute tracks on.
  24.   
  25.   
  26.   
  27.   
  28.   --  put "------------------------------"
  29.   --  if ilk(beatnik) = #instance then stop(beatnik)
  30.   --  set beatnik = VOID
  31.   --  set beatnik = new(xtra "beatnik",TRUE)
  32.   --  set bankFileName = the moviePath & "patches.hsb"
  33.   --  put "beatnik =" && beatnik
  34.   --  put "Bank =" && bankFileName
  35.   --  put "SetSampleLibrary(beatnik) = " & setsampleLibrary(beatnik, bankFileName)
  36.   --  put "SetReady(beatnik) = " & setReady(beatnik)
  37.   --  put "isReady(beatnik) = " & isReady(beatnik)
  38.   --  if not(isReady(beatnik)) then
  39.   --    alert "The Beatnik Xtra did not initialize, the Beatnik soundbank file 'patches.hsb' must be in the same folder as your current Director movie is in (or modify the path in the script). Also, make sure that the Xtra (BEATNIK.X32) is added to this movie."
  40.   --    exit
  41.   --  end if
  42.   --  --  finished initializing the Beatnik Xtra instance
  43.   --  
  44.   
  45.   
  46.   
  47.   
  48.   
  49.   
  50.   
  51.   
  52.   set d = [:]
  53.   
  54.   
  55.   addProp d, #pWhichEvent, [#default: "mouseDown", #format: #symbol, #range: [#mouseDown, #mouseUp, #mouseEnter, #mouseLeave, #mouseWithin,#enterFrame,#exitFrame], #comment: "Choose a trigger event:"]
  56.   addProp d, #pWhichTrack, [#default: "", #format: #integer, #comment: "Enter the number of the track to Mute/un-Mute:"]
  57.   addProp d, #pMuteState, [#default: "1", #format: #integer, #comment: "Enter '1' to Mute, or '0' to un-Mute this track:"]
  58.   
  59.   return d
  60. end
  61.  
  62.  
  63.  
  64. on doIt me
  65.   global beatnik
  66.   setTrackMute(beatnik, pWhichTrack, pMuteState)
  67.   
  68.   
  69. end
  70.  
  71.  
  72.  
  73. on mouseDown me
  74.   if the pWhichEvent of me = #mouseDown then doIt me
  75.   
  76. end
  77.  
  78.  
  79. on mouseUp me
  80.   if the pWhichEvent of me = #mouseUp then doIt me
  81.   
  82.   
  83.   
  84. end
  85.  
  86.  
  87. on mouseEnter me
  88.   if the pWhichEvent of me = #mouseEnter then doIt me
  89.   
  90. end
  91.  
  92.  
  93. on mouseLeave me
  94.   if the pWhichEvent of me = #mouseLeave then doIt me
  95.   
  96. end
  97.  
  98. on mouseWithin me
  99.   if the pWhichEvent of me = #mouseWithin then doIt me
  100.   
  101. end
  102.  
  103. on enterFrame me
  104.   if the pWhichEvent of me = #enterFrame then doIt me
  105.   
  106. end
  107.  
  108. on exitFrame me
  109.   if the pWhichEvent of me = #exitFrame then doIt me
  110.   
  111. end
  112.  
  113.  
  114. on stopMovie
  115.   global beatnik
  116.    stop(beatnik)
  117.   closeBeatnik(beatnik)
  118.   set beatnik=VOID
  119.  
  120. end stopMovie
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127. on getBehaviorDescription
  128.   
  129.   
  130.   set description = "MUTE TRACK LITE BEHAVIOR" && RETURN & "by Paul Sebastien pauls@sirius.com" && RETURN && RETURN & "This Beatnik Behavior allows you to mute or un-mute any track of an RMF file MIDI file playing through a Beatnik Xtra instance named 'beatnik'. You can edit this behavior's script to choose a different instance name if necessary." && RETURN && RETURN & "PARAMETERS:" && RETURN && RETURN & "ò Enter the number of the track to Solo/un-Solo:" && RETURN & "...Lets you specify which track in the RMF or MIDI file to mute or un-mute." && RETURN && RETURN & "ò Choose a trigger event:" && RETURN & "...Lets you choose which Director event you want to trigger the mute/un-mute function." && RETURN && RETURN & "IMPORTANT:" && RETURN &&RETURN & "- This behavior requires that the Beatnik Xtra Lite is properly added to your Director project, and also, the Beatnik soundbank (patches.hsb) must be in the same directory as your Director project file, otherwise you should change the path to the soundbank in this behavior's script if the soundbank resides elsewhere." && RETURN && RETURN & "- If you want to use this behavior to mute tracks on multiple files/instances simultaneously, you should modify the Beatnik instance name used in this behavior's script so it is unique for each instance. Currently, the instance name used is 'beatnik', so if you want to mute tracks on multiple instances or instances named something other than 'beatnik', you can modify the name in the script to 'beatnik2' and so on, as needed, to create multiple separate instances." && RETURN &&RETURN & "For more information on instantiating the Beatnik Xtra Lite, refer to the documentation or other Beatnik Xtra sample movies." && RETURN && RETURN & "To upgrade to Beatnik Behaviors Pro, or for more information on Beatnik-related products and music files, visit the Headspace web site at:" && RETURN && RETURN & "http://www.headspace.com"
  131.   
  132.   return description
  133. end
  134.